package com.sailor.excel.service.Impl;

import com.sailor.excel.apiclient.AutoClient;
import com.sailor.excel.service.AutoService;
import com.sailor.excel.util.BaseModel;
import com.sailor.excel.vo.AircraftBasicInfoResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.concurrent.CompletableFuture;
@Service
@Slf4j
public class AutoServiceImpl implements AutoService {

    @Autowired
    private AutoClient autoClient;

    @Override
    public void testAutoGet() {
        CompletableFuture<BaseModel<AircraftBasicInfoResult>> basicInfoForHomePage = autoClient.getBasicInfoForHomePage(1);
        BaseModel<AircraftBasicInfoResult> join = basicInfoForHomePage.join();
        System.out.println(join.getResult());
    }
}
